package com.tuanda.app.customviewdemo;

import android.content.Context;
import android.graphics.Paint;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;

/**
 * Created by LiDongduo on 2018/9/20.
 */
public abstract class BaseCustomView extends View {
    public Paint mPaint;
    public BaseCustomView(Context context) {
        this(context,null);
    }

    public BaseCustomView(Context context, @Nullable AttributeSet attrs) {
        this(context, attrs,0);
    }

    public BaseCustomView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init();
    }

    private void init(){
        mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
        initData();
    }

    protected abstract void initData();
}
